package com.hw.job_3;

public class MobilePhoneCard {

    private PhoneCardType type;  // 卡类型
    private String card_num;  // 卡号
    private String user_name; // 用户名
    private String pwd; // 密码
    private double account_balance; // 账户余额
    private double call_duration; // 通话时长(分钟)
    private double traffic; // 上网流量

    public MobilePhoneCard(PhoneCardType type, String card_num, String user_name, String pwd, double account_balance, double call_duration, double traffic) {
        setType(type);
        setCard_num(card_num);
        setUser_name(user_name);
        setPwd(pwd);
        setAccount_balance(account_balance);
        setCall_duration(call_duration);
        setTraffic(traffic);
    }

    public void show() {
        System.out.println("卡的类型 = " + type.getType() + ", 卡号 = " + card_num + ", 用户名 = " + user_name + ", 当前余额 = " + account_balance);
    }

    public PhoneCardType getType() {
        return type;
    }

    public void setType(PhoneCardType type) {
        this.type = type;
    }

    public String getCard_num() {
        return card_num;
    }

    public void setCard_num(String card_num) {
        this.card_num = card_num;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public double getAccount_balance() {
        return account_balance;
    }

    public void setAccount_balance(double account_balance) {
        this.account_balance = account_balance;
    }

    public double getCall_duration() {
        return call_duration;
    }

    public void setCall_duration(double call_duration) {
        this.call_duration = call_duration;
    }

    public double getTraffic() {
        return traffic;
    }

    public void setTraffic(double traffic) {
        this.traffic = traffic;
    }
}
